package util;

public class Base64 {
	
	/**
	 * base64加密
	 * @param str
	 * @return
	 */
	public static String getEncoder(String str) {
		return java.util.Base64.getEncoder().encodeToString(str.getBytes());
	}
	
	/**
	 * base64解密
	 * @param str
	 * @return
	 */
	public static String getDecoder(String str) {
		return new String(java.util.Base64.getDecoder().decode(str));
	}

}
